package org.myorg.quickstart;

public class LDPacket_RAW {

    byte[]  frameSeq;    //2 byte
    byte[]  packetSeq;   //2 byte
    byte[]  packetLen;   //2 byte
    byte[]  reserved;    //2 byte
    byte[]  data;        //1460 byte
    byte[]  checksum;    //4 byte

    public LDPacket_RAW(byte[] frameSeq, byte[] packetSeq, byte[] packetLen, byte[] reserved, byte[] data, byte[] checksum) {
        System.arraycopy(frameSeq, 0, this.frameSeq, 0, 2);
        System.arraycopy(packetSeq, 0, this.packetSeq, 0, 2);
        System.arraycopy(packetLen, 0, this.packetLen, 0, 2);
        System.arraycopy(reserved, 0, this.reserved, 0, 2);
        System.arraycopy(data, 0, this.data, 0, 1460);
        System.arraycopy(checksum, 0, this.checksum, 0, 4);
    }

    public LDPacket_RAW(byte[] packetRaw) {
        System.arraycopy(packetRaw, 0, this.frameSeq, 0, 2);
        System.arraycopy(packetRaw, 2, this.packetSeq, 0, 2);
        System.arraycopy(packetRaw, 4, this.packetLen, 0, 2);
        System.arraycopy(packetRaw, 6, this.reserved, 0, 2);
        System.arraycopy(packetRaw, 8, this.data, 0, 1460);
        System.arraycopy(packetRaw, 1468, this.checksum, 0, 4);
    }

    public byte[] getFrameSeq() {
        return frameSeq;
    }

    public void setFrameSeq(byte[] frameSeq) {
        this.frameSeq = frameSeq;
    }

    public byte[] getPacketSeq() {
        return packetSeq;
    }

    public void setPacketSeq(byte[] packetSeq) {
        this.packetSeq = packetSeq;
    }

    public byte[] getPacketLen() {
        return packetLen;
    }

    public void setPacketLen(byte[] packetLen) {
        this.packetLen = packetLen;
    }

    public byte[] getReserved() {
        return reserved;
    }

    public void setReserved(byte[] reserved) {
        this.reserved = reserved;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public byte[] getChecksum() {
        return checksum;
    }

    public void setChecksum(byte[] checksum) {
        this.checksum = checksum;
    }
}
